package com.example.fitness;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class AnalTab extends TabActivity{
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	        setContentView(R.layout.tab_layout);
	        
	        TabHost mTabHost = getTabHost();
	        TabSpec fp_spec = mTabHost.newTabSpec("Fitness Plan");
	        fp_spec.setIndicator("Fitness Plan");
	        Intent fp_Intent = new Intent(this, FitnessPlan.class);
	        fp_spec.setContent(fp_Intent);
	 
	        TabSpec na_spec = mTabHost.newTabSpec("Nutrition Analysis");
	        na_spec.setIndicator("Nutrition Analysis");
	        Intent na_Intent = new Intent(this, NutritionAnalysis.class);
	        na_spec.setContent(na_Intent);
	        
	        // Adding all TabSpec to TabHost
	        
	        mTabHost.addTab(fp_spec); // Adding fitness plan tab
	        mTabHost.addTab(na_spec); // Adding nutrition analysis tab
	    }
}